<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>鸡兔同笼</title>
</head>

<body>
  <script type="text/javascript">
    for (var i = 0; i <= 35; i++) {
      for (var j = 0; j <= 35; j++) {
        if (i * 2 + j * 4 == 96 && i + j == 35) {
          document.write("鸡:" + i + "<br>");
          document.write("兔:" + j);
        }
      }
    }
  </script>
</body>

</html>